<?php
namespace app\fruit\controller;
use app\common\Base;
use app\common\StudentModel;
use think\Db;

class TeacherFruitConf extends Base {
	
	public function index() {
		return $this->fetch();
	}

	public function pageQuery() {
		$result = Db::table("教师成果参数")->select();
		return selectResult($result);
	}

	public function addUpdate() {
		try {
			$param = request()->param();
			if(array_key_exists("ID", $param)) {
				update('教师成果参数', $param);
			}else {
				insert('教师成果参数', $param);
			}
			return '000';
		} catch (Exception $e) {
			echo $e->getMessage();
		}
		return "999";
	} 

}
